package com.yqy.spring.beanAnnotation.bean2;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

@Component("aBean")
public class A {
    public A() {
        System.out.println("A的构造方法执行了");
    }
}

@Repository("bBean")
class B{
    public B() {
        System.out.println("B的构造方法执行了");
    }
}

@Service("cBean")
class C{
    public C() {
        System.out.println("C的构造方法执行了");
    }
}

@Controller("dBean")
class D{
    public D() {
        System.out.println("D的构造方法执行了");
    }
}

@Controller("eBean")
class E{
    public E() {
        System.out.println("E的构造方法执行了");
    }
}

